﻿import flash.external.ExternalInterface;
import as.loadPic;
function loadImg(url,uniID){
	var randomNum=random(1000000000);
	_root.createEmptyMovieClip("loadMc"+randomNum, _root.getNextHighestDepth());
	new loadPic(
				_root["loadMc"+randomNum],
				
				url,
				
				function(ob){
					new ExternalInterface.call("JObj.Plugin.JImgLoader._onStart", url,uniID);
				},
		
				function(loadedBytes,totalBytes,Rate){
					new ExternalInterface.call("JObj.Plugin.JImgLoader._onProcess",url,uniID,loadedBytes,totalBytes);
				},
				
				function(ob,httpstatus){
					new ExternalInterface.call("JObj.Plugin.JImgLoader._onComplete",url,uniID,httpstatus,ob._width,ob._height);
				},
				
				function(ob,errorCode,httpstatus){
					new ExternalInterface.call("JObj.Plugin.JImgLoader._onError",url,uniID,httpstatus,errorCode);
				}
	)
}

ExternalInterface.addCallback("loadImg",this,loadImg);// flashObj.Load()